<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>{title}</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <!-- Le styles -->
        <link href="<?php echo base_url() ?>assets/css/docs.css" rel="stylesheet">
        <link href="<?php echo base_url() ?>assets/css/bootstrap.css" rel="stylesheet">
        <link href="<?php echo base_url() ?>assets/css/bootstrap-responsive.css" rel="stylesheet">
        <style type="text/css">
            body {
                padding-top: 60px;
                padding-bottom: 40px;
            }
        </style>
        <link href="<?php echo base_url() ?>assets/css/bootstrap-responsive.css" rel="stylesheet">

        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <!-- Le fav and touch icons -->
        <link rel="shortcut icon" href="<?php echo base_url() ?>assets/ico/favicon.ico">
        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<?php echo base_url() ?>assets/ico/apple-touch-icon-144-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="114x114" href="<?php echo base_url() ?>assets/ico/apple-touch-icon-114-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<?php echo base_url() ?>assets/ico/apple-touch-icon-72-precomposed.png">
        <link rel="apple-touch-icon-precomposed" href="<?php echo base_url() ?>assets/ico/apple-touch-icon-57-precomposed.png">
    </head>
    <body>
        <div class="navbar navbar-inverse navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <?php echo anchor('', '{name}', 'class="brand"'); ?>
                    <div class="nav-collapse collapse">
                        <ul class="nav">
                            <li class="<?php
                    if ($this->uri->segment(1) == '') {
                        echo'active';
                    }
                    ?>"><?php echo anchor('', 'Home'); ?></li>
                            <li class="<?php
                                if ($this->uri->segment(2) == 'daftar_dosen') {
                                    echo'active';
                                }
                    ?>"><?php echo anchor('materi/daftar_dosen', 'Dosen'); ?></li>
                                <?php
                                $login = $this->session->userdata('login');
                                $privilege = $this->session->userdata('pri');
                                if ($login == TRUE || $privilege == 3) {
                                    echo '<li>' . anchor('mhs/password', 'Password') . '</li>';
                                }
                                ?>
                            <li>
                                <?php echo form_open('main/search', 'class="navbar-form form-search"') ?>
                                <div class="input-append">
                                    <input type="text" class="span2 search-query" placeholder="Ketikkan kata kunci..." name="key">
                                    <button type="submit" class="btn">Search</button>
                                </div>
                                <?php echo form_close() ?>
                            </li>
                        </ul>
                        <?php
                        $login = $this->session->userdata('login');
                        if ($login != TRUE) {
                            echo form_open('main/auth', 'class = "navbar-form pull-right"');
                            echo '<input class = "span2" type = "text" placeholder = "Username" name = "username">
                                <input class = "span2" type = "password" placeholder = "Password" name = "password">
                                <button type = "submit" class = "btn btn-info">Sign in</button>';
                            echo form_close();
                        } else {
                            echo anchor('main/logout', ' <button type = "submit" class = "btn btn-primary pull-right">Logout</button>');
                        }
                        ?>
                    </div><!--/.nav-collapse -->
                </div>
            </div>
        </div>